<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SuggestType extends Model
{
    use HasFactory;

    protected $table = 'sp_suggest_type';
    protected $primaryKey = 'id';
    public $timestamps = false;

    //获取投诉类型
    protected function GetSuggestType()
    {
        $data = $this->get();
        $data = $data ? $data->toArray() : [];
        return $data;
    }

    protected function GetOneSuggestType($where)
    {
        $data = $this
            ->where($where)
            ->first();
        $data = $data ? $data->toArray() : [];
        return $data;
    }


}
